package main

import (
	"fmt"
	"strconv"
	"strings"
)

//作业12 请将这段二进制翻译成中文(unicode编码), 并打印出翻译过程(比如 二进制: 1000 1000 0110 0011, unicode: U+8863, 字符: 衣)

func main() {
	var tow [8][4]int = [8][4]int{{0b1000, 0b1000, 0b0110, 0b0011}, {0b0110, 0b0111, 0b0000, 0b1101}, {0b0101, 0b0101, 0b1001, 0b1100}, {0b0110, 0b1011, 0b0010, 0b0010}, {0b0111, 0b1010, 0b0111, 0b1111}, {0b0100, 0b1110, 0b0010, 0b1101}, {0b0101, 0b0110, 0b1111, 0b1101}, {0b0111, 0b1110, 0b1010, 0b0010}}
	var strs [8]string
	var ints [8]int64
	i := 0
	for _, val := range tow {
		for _, val2 := range val {
			strs[i] += strings.TrimSpace(fmt.Sprintf("%x ", val2))
		}
		i += 1
	}
	for i := 0; i < 8; i++ {
		ints[i], _ = strconv.ParseInt(strs[i], 16, 64)
		fmt.Printf("%c", ints[i])
	}

}
